<template>
    <!-- <el-table :data="tableData" stripe style="width: 100%;height: 180px;" header-cell-style="headClass">
    <el-table-column prop="id"  label="设备ID"  width="200"> </el-table-column>
      <el-table-column prop="time" label="时间" width="200"> </el-table-column>
      <el-table-column prop="label1" label="特征1" width="200"> </el-table-column>
      <el-table-column prop="label2" label="特征2" width="200"> </el-table-column>
      <el-table-column prop="label3" label="特征3" width="200"> </el-table-column>
      <el-table-column prop="condition" label="设备状态" > </el-table-column>
    </el-table> -->
    <el-table
    :data="tableData"
    height="180"
    border:boolean
    style="width: 100%">
    <el-table-column prop="id"  label="设备ID"  width="200"> </el-table-column>
      <el-table-column prop="time" label="时间" width="200"> </el-table-column>
      <el-table-column prop="label1" label="特征1" width="200"> </el-table-column>
      <el-table-column prop="label2" label="特征2" width="200"> </el-table-column>
      <el-table-column prop="label3" label="特征3" width="200"> </el-table-column>
      <el-table-column prop="condition" label="设备状态" > </el-table-column>
  </el-table>

  </template>
  <script>
   import {getexcel} from '../../../networks/excel.js'
  export default {
    data() {
      return {
        tableData: [{
          id: '',
          time: '',
          label1:'',
          label2:'',
          label3:'',
          condition:''
        },]
      }
    },
    mounted(){
    this.getexcel();
  },
    methods: {
      	cellStyle({ rowIndex}){
        	
          	if(rowIndex%2==1) {
            	
              	return {
                	background: 'white',
                  color: '#FFFFFF'
                }
            } 	
             else{
              	return {
                	background: 'blue',
                  color: '#FFFFFF'
                }
              	
            }
        },
    async getexcel(){
      await getexcel().then(res =>
      {
        this.tableData=res.data;
    })
  }
}
}
	
        


  
</script>
<style>

	/*
	// 如果想要设置只悬浮到红色的背景上才改变背景颜色
	// 可以将选择器 .el-table tr:hover td 
	// 改为 .el-table tr.success-row:hover td 就可以了
	.el-table tr.success-row:hover td {
		background: #0ff !important;
		color: #000;
	}
	*/
	
	

</style>